home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / streaming / qtspacketizerreassembler / imaaudiortp / sources / componentthing.r next >
Encoding:
Text File  |  2000-06-23  |  2.7 KB  |  119 lines

  1. /*
  2.     File:        ComponentThing.r
  3.  
  4.     Contains:    Resources common to all components
  5.  
  6.     Copyright:    © 1997-1999 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. /*---------------------------------------------------------------------*/
  11.  
  12. #include "MacTypes.r"
  13. #include "Components.r"
  14.  
  15. enum
  16. {
  17.     kComponentThingResType            = 'thng',
  18.     kComponentNameStringResType        = 'strn',
  19.     kComponentInfoStringResType        = 'stri'
  20. };
  21.  
  22. #ifndef TARGET_REZ_MAC_68K
  23. #define TARGET_REZ_MAC_68K 0
  24. #endif
  25.  
  26.  
  27. #if !TARGET_OS_MAC
  28.     #if    TARGET_OS_WIN32
  29.         #define Target_PlatformType            platformWin32
  30.     #endif
  31.  
  32.     #if TARGET_OS_UNIX
  33.         #if TARGET_CPU_MIPS
  34.             #define Target_PlatformType        platformIRIXmips
  35.         #endif
  36.         #if TARGET_CPU_SPARC
  37.             #define Target_PlatformType        platformSunOSsparc
  38.         #endif
  39.     #endif
  40.  
  41.     #ifndef Target_PlatformType
  42.         #error get a real platform type
  43.     #endif
  44. #endif
  45.  
  46. #if    TARGET_OS_MAC
  47.     #ifndef MW_REZ
  48.         #if TARGET_REZ_MAC_PPC
  49.             read kComponentType (kComponentBaseIDPPC, COMPONENT_NAME_STRING) $$Shell("RsrcDir")COMPONENT_PPC_PEF_STRING;
  50.         #else
  51.             Include $$Shell("RsrcDir")COMPONENT_68K_CODE_STRING 'proc' (0) as kComponentType ( kComponentBaseID68K );
  52.         #endif
  53.     #endif
  54. #else
  55.     resource 'dlle' (kComponentBaseID) {
  56.         COMPONENT_ENTRY_POINT_STRING
  57.     };
  58. #endif
  59.  
  60. resource kComponentNameStringResType (kComponentBaseID)
  61. {
  62.     COMPONENT_NAME_STRING
  63. };
  64.  
  65. resource kComponentInfoStringResType (kComponentBaseID+1)
  66. {
  67.     COMPONENT_INFO_STRING
  68. };
  69.  
  70. resource kComponentThingResType (kComponentBaseID, COMPONENT_NAME_STRING) {
  71.     kComponentType,                    // component type
  72.     kComponentSubType,                // component subtype
  73.     kComponentManufactureType,        // component manufacturer
  74.  
  75.     kComponentFlags,                // flags
  76.     kComponentFlags,                // reserved
  77.  
  78. #if TARGET_REZ_MAC_68K
  79.     kComponentType,                    // code resource type    
  80.     kComponentBaseID,                // code resource ID
  81. #else
  82.     0,                                // code resource type    
  83.     0,                                // code resource ID
  84. #endif
  85.  
  86.     kComponentNameStringResType,    // name resource type
  87.     kComponentBaseID,                // name resource ID
  88.     kComponentInfoStringResType,    // info resource type
  89.     kComponentBaseID+1,                // info resource ID
  90.     0,                                // icon resource type
  91.     0,                                // icon resource ID
  92.  
  93.     kComponentVersion,                // version
  94. #if !TARGET_REZ_MAC_68K
  95.     componentHasMultiplePlatforms |
  96. #endif
  97.     kComponentRegFlags,                // registration flags
  98.     0,                                // icon
  99.     {
  100. #if TARGET_OS_MAC
  101.     #if TARGET_REZ_MAC_68K
  102.         kComponentFlags,                            // flags
  103.         kComponentType, kComponentBaseID68K,        // code
  104.         platform68k,                                // platform
  105.     #endif
  106.         kComponentFlags,                            // flags
  107.         kComponentType, kComponentBaseIDPPC,        // code
  108.         platformPowerPC                             // platform
  109. #else
  110.     kComponentFlags,                                // flags
  111.     'dlle', kComponentBaseID,                        // code
  112.     Target_PlatformType                                // platform
  113. #endif
  114.     },
  115. #if thng_RezTemplateVersion >= 2    // include resource map?
  116.     'thnr', kComponentBaseID
  117. #endif
  118. };
  119.